var express = require('express');
var path=require("path");


var routes = require('./routes/index');
var app = express();

// view engine setup
app.set('views',path.join(__dirname,"views"));
app.engine('.html', require('ejs').renderFile);//注册HTML扩展名的模板
app.set('view engine', 'html');

//声明静态资源位置
app.use(express.static(path.join(__dirname,'public')));

/*使用主路由文件*/
routes(app);

app.listen("8888");

module.exports = app;
